//
//  MainViewIconPanel.m
//  EpointControlDemo
//
//  Created by 李亚春 on 13-5-23.
//  Copyright (c) 2013年 Epoint. All rights reserved.
//

#import "MainViewIconPanel.h"
#import "MainViewIcon.h"
#import "XDWebInfoCategoryListViewController.h"
#import "XDSynViewController.h"
#import "XDWebInfoListViewController.h"
#import "XDTodoListViewController.h"
#import "XDContactsListViewController.h"
#import "XDSettingViewController.h"
#import "XDMailMainViewController.h"
#import "XDAttachManagerViewController.h"
#import "XDScheduleMainViewController.h"

@implementation MainViewIconPanel

- (id)initWithFrame:(CGRect)frame context:(UIViewController *)_context param:(NSMutableDictionary *)params
{
    self = [super initWithFrame:frame];
    if (self) {
        
        NSString *MailCount = [params objectForKey:@"MailCount"];
        NSString *DBCount = [params objectForKey:@"DBCount"];
        
        MainViewIcon *mainIcon = [[MainViewIcon alloc]initWithFrame:CGRectMake(24, 0, 60, 80) title:@"待办事宜" img_normal:@"dbsy" img_highlight:@"" viewController:[XDTodoListViewController class] context:_context tip:DBCount];
        
        MainViewIcon *mainIcon2 = [[MainViewIcon alloc]initWithFrame:CGRectMake(132, 0, 60, 80) title:@"公务邮件" img_normal:@"gwyj" img_highlight:@"" viewController:[XDMailMainViewController class] context:_context tip:MailCount];
        
        MainViewIcon *mainIcon3 = [[MainViewIcon alloc]initWithFrame:CGRectMake(240, 0, 60, 80) title:@"通知公告" img_normal:@"tzgg" img_highlight:@"" viewController:[XDWebInfoListViewController class] context:_context];
        
        MainViewIcon *mainIcon4 = [[MainViewIcon alloc]initWithFrame:CGRectMake(24, 90, 60, 80) title:@"信息简报" img_normal:@"xxjb" img_highlight:@"" viewController:[XDWebInfoCategoryListViewController class] context:_context];
        
        MainViewIcon *mainIcon5 = [[MainViewIcon alloc]initWithFrame:CGRectMake(132, 90, 60, 80) title:@"通讯录" img_normal:@"txl" img_highlight:@"" viewController:[XDContactsListViewController class] context:_context];
        
        MainViewIcon *mainIcon6 = [[MainViewIcon alloc]initWithFrame:CGRectMake(240, 90, 60, 80) title:@"我的日程" img_normal:@"wdrc" img_highlight:@"" viewController:[XDScheduleMainViewController class] context:_context];
        
        MainViewIcon *mainIcon7 = [[MainViewIcon alloc]initWithFrame:CGRectMake(24, 180, 60, 80) title:@"附件管理" img_normal:@"fjgl" img_highlight:@"" viewController:[XDAttachManagerViewController class] context:_context];
        
        MainViewIcon *mainIcon8 = [[MainViewIcon alloc]initWithFrame:CGRectMake(132, 180, 60, 80) title:@"数据同步" img_normal:@"sjtb2" img_highlight:@"" viewController:[XDSynViewController class] context:_context];
        
        MainViewIcon *mainIcon9 = [[MainViewIcon alloc]initWithFrame:CGRectMake(240, 180, 60, 80) title:@"系统设置" img_normal:@"xtsz" img_highlight:@"" viewController:[XDSettingViewController class] context:_context];
        
        [self addSubview:mainIcon];
        [self addSubview:mainIcon2];
        [self addSubview:mainIcon3];
        [self addSubview:mainIcon4];
        [self addSubview:mainIcon5];
        [self addSubview:mainIcon6];
        [self addSubview:mainIcon7];
        [self addSubview:mainIcon8];
        [self addSubview:mainIcon9];
    }
    return self;
}

+(float)getPanelHeight
{
    return 260;
}


@end
